# !ResEd Menu CSE Makefile

# ****** EDIT MAKEPROTO, NOT MAKEFILE ******
# Then construct Makefile using "amu -f MakeProto depend"

# PROGDIR should be set to the application installation directory

# Can set:
#  CFLAGS     -  additional cc options
#  INCLUDES   -  locations to search for "included" files
#  AFLAGS     -  additional objasm options
#  LDFLAGS    -  additional link options

INCLUDES = -I^.^.common

CPFLAGS = A~C~DF~L~N~P~Q~R~S~T~V

LIBS = ^.^.common.o.commonlib C:o.Stubs

CFILES = main.c menuedit.c protocol.c props.c relocate.c lassoo.c drag.c gui.c help.c

OFILES = main.o menuedit.o protocol.o props.o relocate.o lassoo.o drag.o gui.o help.o

FILES = !Config !Help !Icons !Icons22 !Palette !Run !RunImage Messages Palette Templates

all: !RunImage
        @echo *** Menu build complete

!RunImage: $(OFILES) ^.^.common.o.commonlib
        cc -c $(CFLAGS) $(INCLUDES) -o ^.^.common.o.version ^.^.common.c.version
        link $(LDFLAGS) -o $@ $(OFILES) ^.^.common.o.version $(LIBS)
        squeeze $@

^.^.common.o.commonlib:
        dir ^.^.common
        amu o.commonlib
        dir ^.CSE.!Menu

h.icondefs: Templates
        ^.^.^.!WinEdit -h Templates > h.icondefs

.c.o:
        cc -c $(CFLAGS) $(INCLUDES) -o $@ $<

.s.o:
        objasm -quit -CloseExec $(AFLAGS) -from $< -to $@

install: $(FILES)
        copy !Config $(PROGDIR).!Config $(CPFLAGS)
        copy !Help $(PROGDIR).!Help $(CPFLAGS)
        copy !Icons $(PROGDIR).!Icons $(CPFLAGS)
        copy !Icons22 $(PROGDIR).!Icons22 $(CPFLAGS)
        copy !Palette $(PROGDIR).!Palette $(CPFLAGS)
        copy !Run $(PROGDIR).!Run $(CPFLAGS)
        copy !RunImage $(PROGDIR).!RunImage $(CPFLAGS)
        copy Messages $(PROGDIR).Messages $(CPFLAGS)
        copy Palette $(PROGDIR).Palette $(CPFLAGS)
        copy Templates $(PROGDIR).Templates $(CPFLAGS)
        @echo *** Menu installation complete

depend:
        copy MakeProto Makefile1 $(CPFLAGS)
        cc -c -M $(INCLUDES) $(CFILES) >> Makefile1
        remove Makefile0
        -rename Makefile Makefile0
        rename Makefile1 Makefile
        @echo *** Menu dependencies established

clean:
       create o.foo
       wipe o.* ~CRF~V
       remove !RunImage
       remove h.icondefs
       @echo *** Menu cleaned

# Dependencies following this line provided by make depend

o.main:	c.main
o.main:	^.^.common.h.resed
o.main:	^.^.common.h.message
o.main:	^.^.common.h.error
o.main:	^.^.common.h.debug
o.main:	^.^.common.h.dbmalloc
o.main:	h.main
o.main:	^.^.common.h.swicall
o.main:	^.^.common.h.wimp
o.main:	^.^.common.h.resformat
o.main:	^.^.common.h.newmsgs
o.main:	^.^.common.h.focus
o.main:	^.^.common.h.interactor
o.main:	^.^.common.h.registry
o.main:	h.menuedit
o.main:	h.help
o.main:	h.props
o.main:	h.protocol
o.menuedit:	c.menuedit
o.menuedit:	^.^.common.h.resed
o.menuedit:	^.^.common.h.message
o.menuedit:	^.^.common.h.error
o.menuedit:	^.^.common.h.debug
o.menuedit:	^.^.common.h.dbmalloc
o.menuedit:	h.main
o.menuedit:	^.^.common.h.swicall
o.menuedit:	^.^.common.h.wimp
o.menuedit:	^.^.common.h.resformat
o.menuedit:	^.^.common.h.newmsgs
o.menuedit:	^.^.common.h.dbox
o.menuedit:	^.^.common.h.focus
o.menuedit:	^.^.common.h.interactor
o.menuedit:	^.^.common.h.menu
o.menuedit:	^.^.common.h.registry
o.menuedit:	h.format
o.menuedit:	h.relocate
o.menuedit:	h.menuedit
o.menuedit:	h.drag
o.menuedit:	h.gui
o.menuedit:	h.help
o.menuedit:	h.lassoo
o.menuedit:	h.props
o.menuedit:	h.protocol
o.protocol:	c.protocol
o.protocol:	^.^.common.h.resed
o.protocol:	^.^.common.h.message
o.protocol:	^.^.common.h.error
o.protocol:	^.^.common.h.debug
o.protocol:	^.^.common.h.dbmalloc
o.protocol:	h.main
o.protocol:	^.^.common.h.swicall
o.protocol:	^.^.common.h.wimp
o.protocol:	^.^.common.h.resformat
o.protocol:	^.^.common.h.newmsgs
o.protocol:	^.^.common.h.registry
o.protocol:	h.format
o.protocol:	h.menuedit
o.protocol:	h.props
o.protocol:	h.protocol
o.props:	c.props
o.props:	^.^.common.h.resed
o.props:	^.^.common.h.message
o.props:	^.^.common.h.error
o.props:	^.^.common.h.debug
o.props:	^.^.common.h.dbmalloc
o.props:	h.main
o.props:	^.^.common.h.swicall
o.props:	^.^.common.h.wimp
o.props:	^.^.common.h.resformat
o.props:	^.^.common.h.newmsgs
o.props:	^.^.common.h.dbox
o.props:	^.^.common.h.registry
o.props:	h.format
o.props:	h.menuedit
o.props:	h.icondefs
o.props:	h.gui
o.props:	h.props
o.props:	h.protocol
o.relocate:	c.relocate
o.relocate:	^.^.common.h.resed
o.relocate:	^.^.common.h.message
o.relocate:	^.^.common.h.error
o.relocate:	^.^.common.h.debug
o.relocate:	^.^.common.h.dbmalloc
o.relocate:	h.main
o.relocate:	^.^.common.h.resformat
o.relocate:	h.relocate
o.lassoo:	c.lassoo
o.lassoo:	^.^.common.h.resed
o.lassoo:	^.^.common.h.message
o.lassoo:	^.^.common.h.error
o.lassoo:	^.^.common.h.debug
o.lassoo:	^.^.common.h.dbmalloc
o.lassoo:	h.main
o.lassoo:	^.^.common.h.swicall
o.lassoo:	^.^.common.h.wimp
o.lassoo:	^.^.common.h.resformat
o.lassoo:	^.^.common.h.newmsgs
o.lassoo:	^.^.common.h.dragdrop
o.lassoo:	^.^.common.h.interactor
o.lassoo:	h.menuedit
o.lassoo:	h.lassoo
o.drag:	c.drag
o.drag:	^.^.common.h.resed
o.drag:	^.^.common.h.message
o.drag:	^.^.common.h.error
o.drag:	^.^.common.h.debug
o.drag:	^.^.common.h.dbmalloc
o.drag:	h.main
o.drag:	^.^.common.h.swicall
o.drag:	^.^.common.h.wimp
o.drag:	^.^.common.h.resformat
o.drag:	^.^.common.h.newmsgs
o.drag:	^.^.common.h.dragdrop
o.drag:	^.^.common.h.interactor
o.drag:	^.^.common.h.registry
o.drag:	h.menuedit
o.drag:	h.drag
o.drag:	h.props
o.drag:	h.protocol
o.gui:	c.gui
o.gui:	^.^.common.h.resed
o.gui:	^.^.common.h.message
o.gui:	^.^.common.h.error
o.gui:	^.^.common.h.debug
o.gui:	^.^.common.h.dbmalloc
o.gui:	h.main
o.gui:	^.^.common.h.wimp
o.gui:	^.^.common.h.resformat
o.gui:	^.^.common.h.newmsgs
o.gui:	^.^.common.h.dbox
o.gui:	h.format
o.gui:	h.gui
o.help:	c.help
o.help:	^.^.common.h.resed
o.help:	^.^.common.h.message
o.help:	^.^.common.h.error
o.help:	^.^.common.h.debug
o.help:	^.^.common.h.dbmalloc
o.help:	h.main
o.help:	^.^.common.h.swicall
o.help:	^.^.common.h.wimp
o.help:	^.^.common.h.resformat
o.help:	^.^.common.h.newmsgs
o.help:	^.^.common.h.menu
o.help:	^.^.common.h.registry
o.help:	h.menuedit
o.help:	h.help
